#include("/common/_layout.html")
#@layout()
#define layoutHead()
	<title>菜单列表</title>
#end
#define layoutBody()
	<body>
		<div class="layui-tab page-content-wrap">
		  <ul class="layui-tab-title">
		    <li class="layui-this">修改资料</li>
		    <li>修改密码</li>
		  </ul>
		  <div class="layui-tab-content">
		    <div class="layui-tab-item layui-show">
		    	<form class="layui-form"  style="width: 90%;padding-top: 20px;">
						<div class="layui-form-item">
						  <label class="layui-form-label">姓名：</label>
						  <div class="layui-input-block">
						    <input type="text" name="user_name" required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input" value="#(login_user_record.getStr("user_name"))">
						  </div>
						</div>
				   <div class="layui-form-item">
				    <label class="layui-form-label">手机：</label>
				    <div class="layui-input-block">
				      <input type="text" name="user_mobile" required  lay-verify="required" placeholder="请输入手机号" autocomplete="off" class="layui-input" value="#(login_user_record.getStr("user_mobile"))">
				    </div>
				  </div>
				  <div class="layui-form-item">
				    <label class="layui-form-label">邮箱：</label>
				    <div class="layui-input-block">
				      <input type="text" name="user_email" required  lay-verify="required" placeholder="请输入邮箱" autocomplete="off" class="layui-input" value="#(login_user_record.getStr("user_email"))">
				    </div>
				  </div>
				  <div class="layui-form-item">
				    <div class="layui-input-block">
				      <button class="layui-btn layui-btn-normal" lay-submit lay-filter="adminInfo">立即提交</button>
				    </div>
				  </div>
				</form>
		    </div>
		    <div class="layui-tab-item">
		    	<form class="layui-form" v style="width: 90%;padding-top: 20px;">
				  <div class="layui-form-item">
				    <label class="layui-form-label">旧密码：</label>
				    <div class="layui-input-block">
				      <input type="password" id="oldpwd" name="oldpwd" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
				    </div>
				  </div>
				  <div class="layui-form-item">
				    <label class="layui-form-label">新密码：</label>
				    <div class="layui-input-block">
				      <input type="password"  id="newpwd" name="newpwd" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
				    </div>
				  </div>
				  <div class="layui-form-item">
				    <label class="layui-form-label">重复密码：</label>
				    <div class="layui-input-block">
				      <input type="password" id="newpwd2" name="newpwd2" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
				    </div>
				  </div>
				  <div class="layui-form-item">
				    <div class="layui-input-block">
				      <button class="layui-btn layui-btn-normal" lay-submit lay-filter="adminPassword">立即提交</button>
				    </div>
				  </div>
				</form>
		    </div>
		  </div>
		</div>
	<script>
		//Demo
		layui.use(['form','element'], function(){
		  var form = layui.form();
		  var element = layui.element();
		  form.render();
		  //监听信息提交
		  form.on('submit(adminInfo)', function(data){
		    sendPost("/api/eduorg/auth/updateInfo", data.field, function(res){
		    		//console.log(res);
		    		layer.alert(res.msg, {
		    			title: '信息提示'
		    		});
		    });
		    return false;
		  });
		  //监听密码提交
		   form.on('submit(adminPassword)', function(data){
		    //layer.msg(JSON.stringify(data.field));
				sendPost("/api/eduorg/auth/updatePwd", data.field, function(res){
						//console.log(res);
						layer.alert(res.msg, {
							title: '信息提示'
						});
				});
		    return false;
		  });
			
			
		});
	</script>
	</body>
#end